home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Graphics / PerfectPaint / rexx / box / PatchWork.rx < prev    next >
Encoding:
Text File  |  2001-08-30  |  1.2 KB  |  78 lines

  1. /* Box arexx test */
  2.  
  3.     options results
  4.   parse ARG Port x1 y1 x2 y2 b
  5.     ADDRESS value Port
  6.  
  7.     pp_GetDepth
  8.     D=result
  9.     IF D<24 then DO
  10.         pp_Warn 'This*script*is*only|for*24bits*Picture.'    
  11.         pp_PermitRefresh
  12.         Exit
  13.     END
  14.  
  15.     type=0
  16.     pp_DialogInit 150 60 "*PatchWork*" 1
  17.         pp_Cycle 0 50 8 70 16 "Size" 1 "1|2|3|4" type
  18.     pp_Dialog
  19.     rc=result
  20.     if rc=0 then
  21.         do
  22.             EXIT
  23.         end        
  24.  
  25.     pp_GetDialog 0
  26.     type=result
  27.  
  28.     pp_GetPenType
  29.     Type=result
  30.  
  31.     pp_ClosestColor 0 0 0
  32.     Black=result
  33.  
  34.     pp_ComposeReqOff
  35.     pp_EffectOn
  36.     pp_Compose 0 100 0
  37.     pp_AvoidRefresh    
  38.     pp_Progresstext 'PatchWork'
  39.     pp_UpdateUndoBox x1-1 y1-1 x2+1 y2+1
  40.  
  41.     pp_Progress 1 4
  42.     pp_RainbowMosaic (type*5)+10
  43.     pp_BoxF x1 y1 x2 y2
  44.  
  45.         pp_Progress 2 4
  46.     C=-1
  47.         pp_ConvInit 0 1 0
  48.         pp_Conv 0 0 0 0 0 0
  49.         pp_Conv 1 0 0 C 0 0
  50.         pp_Conv 2 0 C 5 C 0
  51.         pp_Conv 3 0 0 C 0 0
  52.         pp_Conv 4 0 0 0 0 0
  53.         pp_BoxF x1 y1 x2 y2
  54.  
  55.     pp_Progress 3 4
  56.     C=-3
  57.     C2=-1
  58.         pp_ConvInit 1 1 0
  59.         pp_Conv 0 0 0 1 0 0
  60.         pp_Conv 1 0 0 3 0 0
  61.         pp_Conv 2 1 3 1 C C2
  62.         pp_Conv 3 0 0 C 0 0
  63.         pp_Conv 4 0 0 C2 0 0
  64.         pp_BoxF x1 y1 x2 y2
  65.  
  66.     pp_EffectOff
  67.     pp_SetApen Black
  68.     pp_PenType 0
  69.     pp_box x1 y1 x2 y2
  70.     pp_box x1+1 y1+1 x2-1 y2-1
  71.     pp_PenType Type
  72.     pp_ComposeReqOn
  73.     pp_PermitRefresh
  74.     pp_ProgressClr
  75.  
  76.  
  77.     Exit
  78.